package cn.net.xyan.facerecognition

import cn.net.xyan.facerecognition.service.FaceRecognitionService
import cn.net.xyan.facerecognition.service.FaceService
import cn.net.xyan.facerecognition.service.FaceServiceImpl
import cn.net.xyan.facerecognition.service.OpenCVLBPHFaceRecognizerImpl
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.context.annotation.Bean
import org.springframework.data.jpa.repository.config.EnableJpaRepositories

@SpringBootApplication
@EnableJpaRepositories(
        basePackages = arrayOf("cn.net.xyan.facerecognition.dao")
)
class FaceRecognitionApplication{
    @Bean
    fun faceRecognitionService(): FaceRecognitionService {
        return OpenCVLBPHFaceRecognizerImpl()
    }

    @Bean
    fun faceService():FaceService{
        return FaceServiceImpl()
    }


}

fun main(args: Array<String>) {
    SpringApplication.run(FaceRecognitionApplication::class.java, *args)
}
